package org.nobject.common.swing.g;

import java.awt.Container;
import java.awt.Graphics;
import java.awt.HeadlessException;

import javax.swing.JFrame;
import javax.swing.JMenuBar;

/**
 * GFrame
 *
 * @author bianrongjun
 * @version 1.0
 */
public class GFrame extends JFrame implements IG{

	/**
	 * 构造函数 
	 * @throws HeadlessException
	 */
	public GFrame() throws HeadlessException {
		super();
		this.core=new GComponent();
	}

	/* (non-Javadoc)
	 * @see javax.swing.JFrame#setContentPane(java.awt.Container)
	 */
	public void setContentPane(Container contentPane) {
		super.setContentPane(contentPane);
		this.validate();
	}

	/* (non-Javadoc)
	 * @see javax.swing.JFrame#setJMenuBar(javax.swing.JMenuBar)
	 */
	public void setJMenuBar(JMenuBar menubar) {
		super.setJMenuBar(menubar);
		this.validate();
	}

	/** GComponent */
	private GComponent core;
	public GComponent getGCore() {return core;}
	
	
	public void paintChildren(Graphics g) {core.paintChildren(g);}
}
